This invention relates to an apparatus and method for testing software and, more particularly, to an apparatus and method for testing one or more objects in an object-oriented software environment.
Software development is a complicated activity. In recent years, software programs have been getting larger and the relationships between sub-parts in a software program have been getting more complex. In addition, the advent of object-oriented programming has brought new opportunities and difficulties to the software development process.
Object-oriented software is comprised of a set of "objects" that are, as much as possible, complete entities, passing messages back and forth between themselves. There is no predetermined path that determines the flow of control through the program. There are only possible paths, depending on the sequence of message passing.
The nature of object-oriented programming leads to a number of unusual testing problems. For example, it is important to verify that the data structures in each object are correct and that the data in the data structures is valid. Often, however, data structures are accessible only to the objects that contain them and are not accessible to other objects. Additionally, it is important to be able to identify the point in the program at which an error occurred. Again, the nature of object-oriented programming makes this more difficult.
What is needed is a simple way of checking both the structure and contents of data structures in an object and a way of communicating where in a plurality of objects an error has occurred.